package com.demo.enumdemo;


/**
 * 枚举实现接口
 * 
 * @author xiangty
 *
 */
interface print{
	public String getColor();
}

enum ColorImplementsPrintEnum implements print{
	RED{
		public String getColor(){
			return "红色";
		}
	},
	GREEN{
		public String getColor() {
			return "绿色";
		}
	},
	BLUE{
		public String getColor() {
			return "蓝色";
		}
	};
}
public class EnumImplementsDemo {
	public static void main(String[] args){
		for(ColorImplementsPrintEnum c : ColorImplementsPrintEnum.values()){
			System.out.println(c+"---"+c.getColor());
		}
	}
}
